/*
 * DoFile.h
 *
 *  Created on: Oct 18, 2012
 *      Author: wtao
 */

#ifndef DOFILE_H_
#define DOFILE_H_

#include "_DoCompositeObject.h"
#include <sstream>

class DevilParser;

class DoFile: public _DoCompositeObject, public onTokenListener
{
protected:
	istream &mIn;
	std::ostringstream *mOss;
	
	DoFile(const DoFile&);
	DoFile& operator=(const DoFile&);
public:
	DoFile(istream &in);
	virtual ~DoFile();
	
	void addFilter(const char * filtername);
	
	void decode(DevilParser& parser, std::ostringstream& oss);
		
	virtual void onToken(CRefPtr< _DoObject > token);

	virtual onTokenListener::eContinueParse onChar(int currChar);
};

#endif /* DOFILE_H_ */
